﻿using System;
using UnityEngine;

[Serializable]
public class PlayerLayerData
{
    [SerializeField]
    private LayerMask groundLayer;

    public LayerMask GroundLayer
    {
        get => groundLayer;
        private set => groundLayer = value;
    }
    
    public bool ContainsLayer(LayerMask layerMask, int layer)
    {
        return (layerMask & (1 << layer)) != 0;
    }
    
    public bool ContainsGroundLayer(int layer)
    {
        return ContainsLayer(GroundLayer, layer);
    }
}